package com.example.demo;

import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
import com.example.demo.core.controller.UserController;
import com.example.demo.core.mapper.UserMapper;
import com.example.demo.core.method.DeleteAll;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 自定义Sql注入
 */
@Component
public class MySqlInjector extends DefaultSqlInjector{

    public List<AbstractMethod> getMethodList() {
        List<AbstractMethod> methodList = super.getMethodList();
        //增加自定义的方法
        methodList.add(new DeleteAll());
        return methodList;
    }

    public static void main(String[] args) {

    }

}
